package org.dromara.system.domain.bo;

import org.dromara.system.domain.ZtCoupon;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 优惠卷业务对象 zt_coupon
 *
 * @author Lion Li
 * @date 2024-06-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ZtCoupon.class, reverseConvertGenerate = false)
public class ZtCouponBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 类型（01：满减卷，02：折扣卷）
     */
    @NotBlank(message = "类型（01：满减卷，02：折扣卷）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 优惠卷名称
     */
    @NotBlank(message = "优惠卷名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 优惠卷到期日期
     */
    @NotNull(message = "优惠卷到期日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date expirationDate;

    /**
     * 领取之后有效天数
     */
    @NotNull(message = "领取之后有效天数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long claimValidDays;

    /**
     * 抵扣金额/折扣
     */
    @NotNull(message = "抵扣金额/折扣不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amountOfMoney;

    /**
     * 最少满足金额
     */
    @NotNull(message = "最少满足金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal minAmount;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;

    /**
     * 是否开启（Y：是，N：否）
     */
    @NotBlank(message = "是否开启（Y：是，N：否）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

}
